<template>
  <div :style="{ color: color }">
    这是孙子组件接收到爷爷组件的数据{{ color }}
  </div>

  <hr />
</template>

<script>
import { inject } from "vue";
export default {
  setup() {
    const color = inject("fatherData");
    return {
      color,
    };
  },
};
</script>

<style></style>
